home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / nt4.0 workstation / OEMNADNI.IN_ / oemnadni.inf
Encoding:
INI File  |  1996-07-12  |  31.5 KB  |  810 lines

  1. [Identification]
  2.     OptionType = NetAdapter
  3. [PlatformsSupported]
  4.     PCMCIA
  5. [Options]
  6.     NE2000IBMCOMPAT
  7.     NE4000PCMCIA
  8.     MICRODYNEPCMCIA
  9. [FileConstants]
  10. UtilityInf      = "UTILITY.INF"
  11. ParamInf        = "NCPARAM.INF"
  12. subroutineinf   = "SUBROUTN.INF"
  13. SoftwareType    = "driver"
  14. Exit_Code       = 0
  15. NetEventDLL     = "%SystemRoot%\System32\netevent.dll"
  16. IoLogMsgDLL     = "%SystemRoot%\System32\IoLogMsg.dll"
  17. Manufacturer    = "Microsoft"
  18. ProductMajorVersion     = "4"
  19. ProductMinorVersion     = "0"
  20. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  21. ProductSoftwareName     = "NE2000"
  22. ProductSoftwareImagePath = "\SystemRoot\System32\drivers\ne2000.sys"
  23. NetRuleSoftwareType     = "ne2000Sys ndisDriver ne2000Driver"
  24. NetRuleSoftwareUse      = $(SoftwareType)
  25. NetRuleSoftwareBindForm = """Ne2000Sys"" yes no container"
  26. NetRuleSoftwareClass    = {"ne2000Driver basic"}
  27. NetRuleSoftwareBindable = {"ne2000Driver ne2000Adapter non exclusive 100"} 
  28. ProductHardwareName     = "NE2000"
  29. NetRuleHardwareType     = "ne2000 ne2000Adapter"
  30. NetRuleHardwareBindForm = " yes yes container"
  31. NetRuleHardwareClass    = {"ne2000Adapter basic"}
  32. ProductOpSupport     = 134 
  33. ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  34. ParamKeyName    = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  35. [GeneralConstants]
  36. from      = ""
  37. to        = ""
  38. ExitCodeOk     = 0
  39. ExitCodeCancel = 1
  40. ExitCodeFatal  = 2
  41. KeyNull         = ""
  42. MAXIMUM_ALLOWED   = 33554432
  43. RegistryErrorIndex = NO_ERROR
  44. KeyProduct      = ""
  45. KeyParameters   = ""
  46. TRUE            = 1
  47. FALSE           = 0
  48. NoTitle            = 0
  49. ExitState   = "Active"
  50. OldVersionExisted = $(FALSE)
  51. DriverPath      = $(!STF_NTPATH)\drivers
  52. [date]
  53.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  54. [Identify]
  55.     read-syms Identification
  56.     set Status     = STATUS_SUCCESSFUL
  57.     set Identifier = $(OptionType)
  58.     set Media      = #("Source Media Descriptions", 1, 1)
  59.     Return $(Status) $(Identifier) $(Media)
  60. [ReturnOptions]
  61.     set Status        = STATUS_FAILED
  62.     set OptionList     = {}
  63.     set OptionTextList = {}
  64.     set LanguageList = ^(LanguagesSupported, 1)
  65.     Ifcontains(i) $($0) in $(LanguageList)
  66.         ifstr(i) $($1) == ""
  67.            goto returnoptions
  68.         endif
  69.         set PlatformList = ^(PlatformsSupported, 1)
  70.         Ifcontains(i) $($1) in $(PlatformList)
  71.            goto returnoptions
  72.         else
  73.            set Status = STATUS_NOTSUPPORTED
  74.            goto finish_ReturnOptions
  75.         endif
  76.     else
  77.         set Status = STATUS_NOLANGUAGE
  78.         goto finish_ReturnOptions
  79.     endif
  80. returnoptions = +
  81.     set OptionList     = ^(Options, 1)
  82.     set OptionTextList = ^(OptionsText$($0), 1)
  83.     set Status         = STATUS_SUCCESSFUL
  84. finish_ReturnOptions = +
  85.     Return $(Status) $(OptionList) $(OptionTextList)
  86. [InstallOption]
  87.     set Option   = $($1)
  88.     set SrcDir   = $($2)
  89.     set AddCopy  = $($3)
  90.     set DoCopy   = $($4)
  91.     set DoConfig = $($5)
  92.     set LanguageList = ^(LanguagesSupported, 1)
  93.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  94.         Return STATUS_NOLANGUAGE
  95.     endif
  96.     set-subst LF = "\n"
  97.     read-syms GeneralConstants
  98.     read-syms FileConstants
  99.     read-syms DialogConstants$(!STF_LANGUAGE)
  100.     ifstr(i) $(!NTN_Origination) == "NCPA"
  101.         set Continue = $(OK)
  102.     endif
  103.     read-syms FileConstants$(!STF_LANGUAGE)
  104.     detect date
  105.     set-title  $(FunctionTitle)
  106.     set to   = Begin
  107.     set from = Begin
  108.     set CommonStatus = STATUS_SUCCESSFUL
  109.     EndWait
  110. Begin = +
  111.     set ActivateDetection = FALSE
  112.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  113.                 set StartLabel = removeadapter
  114.         else-Ifstr(i) $(!NTN_InstallMode) == Update
  115.                         set StartLabel = UpgradeSoftware
  116.         else-Ifstr(i) $(!NTN_InstallMode) == bind
  117.                 set StartLabel = bindingadapter
  118.         else-Ifstr(i) $(!NTN_InstallMode) == configure
  119.                 set CommonStatus = STATUS_REBOOT
  120.                 set ActivateDetection = TRUE
  121.                 set StartLabel = configureadapter
  122.                 Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  123.                         Debug-Output "Cannot configure the Novell 2000 driver software."
  124.                         Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  125.                         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  126.                                 Debug-Output "ShellCode error: cannot get an error string."
  127.                                 goto ShellCodeError
  128.                         endif
  129.                         set Error = $($R0)
  130.                         set from = end
  131.                         set to = end
  132.                         goto nonfatalinfo
  133.                 endif
  134.     else
  135.                 set StartLabel = installadapter
  136.                 set OEM_ABANDON_OPTIONS = {}
  137.                 set OEM_ABANDON_SOFTWARE = FALSE
  138.                 set OEM_ABANDON_ON = TRUE
  139.                 set ActivateDetection = TRUE
  140.     endif
  141.     Debug-Output "OEMNADN2.INF: =================================================="
  142.     Debug-Output "OEMNADN2.INF: STF_CWDIR is: "$(!STF_CWDIR)
  143.     Debug-Output "OEMNADN2.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  144.     Debug-Output "OEMNADN2.INF: Option is: "$(Option)
  145.     Debug-Output "OEMNADN2.INF: !STF_NCDETECT  is: "$(!STF_NCDETECT)
  146.     Debug-Output "OEMNADN2.INF: !STF_NCOPTION  is: "$(!STF_NCOPTION)
  147.     Debug-Output "OEMNADN2.INF: !STF_NCDETCARD is: "$(!STF_NCDETCARD)
  148.     Debug-Output "OEMNADN2.INF: !STF_NCDETINFO is: "$(!STF_NCDETINFO)
  149.     Debug-Output "OEMNADN2.INF: =================================================="
  150.     Set DetectedCard = FALSE
  151.     set PCMCIA = 1
  152.     set CardType = 1
  153.     Ifstr(i) $(ActivateDetection) != TRUE
  154.         Goto skipdetection
  155.     Endif
  156.     Set TypeList = {{IRQ,IRQList,IRQValue},+
  157.                     {PCMCIA, PCMCIAList, PCMCIA},+
  158.                     {CARDTYPE, CardTypeList, CardType},+
  159.                     {PCCARDATTRIBUTEMEM, PcCardAddressDecList, PcCardBaseValue},+
  160.                     {IOADDR, IOBaseAddrDecList, IOBaseAddrValue}}
  161.     Debug-Output "OEMNADN2.INF: Calling Param_BuildTypeLists"
  162.     Shell $(ParamInf) Param_BuildTypeLists NE2000IBMCOMPAT $(TypeList)
  163.     Set Status = $($R0)
  164.     ifstr(i) $(Status) != STATUS_SUCCESSFUL
  165.         Goto fataldetect
  166.     Endif
  167.     Debug-Output "OEMNADN2.INF: Calling Param_SetDefaults"
  168.     Shell $(ParamInf) Param_SetDefaults {}
  169.     Shell $(ParamInf) HexListFromDecList $(IOBaseAddrDecList)
  170.     Set IOBaseAddrHexList = $($R0)
  171.     Shell $(ParamInf) HexListFromDecList $(PcCardAddressDecList)
  172.     Set PcCardAddressHexList = $($R0)
  173.     Shell $(UtilityInf) SortList $(IRQList) TRUE FALSE
  174.     Set IRQList = $($R0)
  175.     Ifstr(i) $(!STF_NCDETECT) == YES
  176.         Ifstr(i) $(!STF_NCOPTION) == "NE2000IBMCOMPAT"
  177.            Set DetectedCard = TRUE
  178.            Debug-Output "OEMNADN2.INF: Setting DetectedCard to TRUE"
  179.         Endif
  180.     Endif
  181. skipdetection =+
  182.     set from = $(fatal)
  183.     set to = $(fatal)
  184.     goto $(StartLabel)
  185. installadapter = +
  186.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  187.     Ifstr $(KeyProduct) != $(KeyNull)
  188.         CloseRegKey $(KeyProduct)
  189.         ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
  190.            Shell $(UtilityInf), VerExistedDlg, $(ProductSoftware$(Option)Title),+
  191.                $(ProductVersion)
  192.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  193.                Debug-Output "ShellCode error: cannot get an error string."
  194.                goto ShellCodeError
  195.            endif
  196.            goto end
  197.         else
  198.            Shell $(UtilityInf), CardExistedDlg
  199.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  200.                Debug-Output "ShellCode error: cannot get an error string."
  201.                goto ShellCodeError
  202.            endif
  203.            ifstr(i) $($R1) != "OK"
  204.                set CommonStatus = STATUS_USERCANCEL
  205.                goto end
  206.            endif
  207.            set OldVersionExisted = $(TRUE)
  208.         endif
  209.     endif
  210.     Ifstr(i) $(DetectedCard) != TRUE
  211.         Goto adaptersetup
  212.     Endif
  213.     StartWait
  214.     Shell $(ParamInf) Param_QueryCard $(!STF_NCDETCARD)
  215.     EndWait
  216.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  217.         Goto adaptersetup
  218.     Endif
  219.     Set DetectedParams = $($R1)
  220.     Debug-Output "OEMNADN2.INF: Calling Param_SetDefaults to merge detected params"
  221.     Shell $(ParamInf) Param_SetDefaults $(DetectedParams)
  222.     goto adaptersetup
  223. configureadapter = +
  224.     Ifstr $(KeyProduct) == $(KeyNull)
  225.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  226.         Ifstr $(KeyProduct) == $(KeyNull)
  227.             set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  228.             Debug-Output "Cannot find component product key"
  229.             goto fatalregistry
  230.         Endif
  231.     Endif
  232.     Debug-Output "INF: Shelling to FindService"
  233.     Shell $(UtilityInf) FindService, $(KeyProduct)
  234.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  235.         Debug-Output "INF: FindService shell failure"
  236.         Goto ShellCodeError
  237.     Endif
  238.     Ifstr(i) $($R0) != NO_ERROR
  239.         Debug-Output "INF: FindService Shell error: "$($R0)
  240.         Goto fatalregistry
  241.     endif
  242.     set KeyParameters = $($R2)
  243.     CloseRegKey $($R1)
  244.     Ifstr $(KeyParameters) == $(KeyNull)
  245.         set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  246.         Debug-Output "Cannot find component service"
  247.         goto fatalregistry
  248.     endif
  249.     set OldVersionExisted = $(TRUE)
  250.     set ValueName = ""
  251.     set ValueData = ""
  252.     set ValueStr  = ""
  253.     set ValueList = {}
  254.     EnumRegValue $(KeyParameters) ValueList
  255.     ForListDo $(ValueList)
  256.         set ValueItem = $($)
  257.         set ValueName = *($(ValueItem),1)
  258.         set ValueData = *($(ValueItem),4)
  259.         Ifstr(i) $(ValueName) == "InterruptNumber"
  260.             set IRQValue = $(ValueData)
  261.         else-Ifstr(i) $(ValueName) == "PCCARDAttributeMemoryAddress"
  262.             set PcCardBaseValue = $(ValueData)
  263.         else-ifstr(i) $(ValueName) == "IoBaseAddress"
  264.             set IOBaseAddrValue = $(ValueData)
  265.         else-ifstr(i) $(ValueName) == "BusType"
  266.             set BusInterfaceType = $(ValueData)
  267.         else-ifstr(i) $(ValueName) == "PCMCIA"
  268.             set PCMCIA = $(ValueData)
  269.         else-ifstr(i) $(ValueName) == "BusNumber"
  270.             set BusNumber = $(ValueData)
  271.         endif
  272.     EndForListDo
  273.     ifstr(i) $(IRQValue) == ""
  274.         set IRQValue = *($(IRQList), 2)
  275.     endif
  276.     ifstr(i) $(IOBaseAddrValue) == ""
  277.         set IOBaseAddrValue = *($(IOBaseAddrDecList), 1)
  278.     endif
  279. adaptersetup =+
  280.     Shell $(ParamInf) Param_ParameterConfidence
  281.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  282.         Debug-Output "OEMNADE2.INF: parameter confidence too low to bypass configuration"
  283.         Goto adapteroptions
  284.     Endif
  285.     Ifstr(i) $(DetectedCard) == TRUE
  286.         Ifstr(i) $(!STF_INSTALL_MODE) != CUSTOM
  287.             set BusInterfaceType = *($(!STF_NCDETINFO),5)
  288.             set BusNumber = *($(!STF_NCDETINFO),6)
  289.             Goto adapterverify
  290.         Endif
  291.     Endif
  292.     goto adapteroptions
  293. adapteroptions = +
  294.     set from = adapteroptions
  295.     ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"
  296.         ifstr(i) $(!AutoNetInterfaceType) != ""
  297.             set BusInterfaceType = $(!AutoNetInterfaceType)
  298.         else
  299.             set BusInterfaceType = 1    
  300.         endif
  301.         ifstr(i) $(!AutoNetBusNumber) != ""
  302.             set BusNumber = $(!AutoNetBusNumber)
  303.         else
  304.             set BusNumber = 0
  305.         endif
  306.         goto adapterverify
  307.     endif
  308.     set IOBaseAddress = *($(IOBaseAddrHexList), ~($(IOBaseAddrDecList),+
  309.         $(IOBaseAddrValue)))
  310.     set PcCardBaseAddress = *($(PcCardAddressHexList), ~($(PcCardAddressDecList),+
  311.         $(PcCardBaseValue)))
  312.     read-syms FileDependentDlg$(!STF_LANGUAGE)
  313.     ui start "InputDlg"
  314.     ifstr(i) $(DLGEVENT) == "CONTINUE"
  315.         set IRQValue = $(Combo1Out)
  316.         set PcCardBaseAddress = $(Combo2Out)
  317.         set IOBaseAddress = $(Combo3Out)
  318.         ui pop 1
  319.     else-ifstr(i) $(DLGEVENT) == "BACK"
  320.         set CommonStatus = STATUS_USERCANCEL
  321.         Debug-Output "Action: exit. Bye."
  322.         ui pop 1
  323.         goto end
  324.     else
  325.                 ui pop 1
  326.                 Debug-Output "Action: unknown. Bye."
  327.                 goto end
  328.     endif
  329.     set PcCardBaseValue = *($(PcCardAddressDecList), ~($(PcCardAddressHexList),+
  330.         $(PcCardBaseAddress)))
  331.     set IOBaseAddrValue = *($(IOBaseAddrDecList), ~($(IOBaseAddrHexList),+
  332.         $(IOBaseAddress)))
  333.     ifstr(i) $(!STF_NCDETINFO) == {}
  334.         ifint $(PCMCIA) != 1
  335.             Shell $(UtilityInf),GetBusTypeDialog,$(ProductHardware$(Option)Description) $(BusInterfaceType) $(BusNumber)
  336.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  337.                 Debug-Output "ShellCode error."
  338.                 goto ShellCodeError
  339.             endif
  340.             set BusInterfaceType = $($R1)
  341.             set BusNumber = $($R2)
  342.         else
  343.             set BusInterfaceType = 1
  344.             set BusNumber = 0
  345.         endif
  346.     else
  347.         set BusInterfaceType = *($(!STF_NCDETINFO),5)
  348.         set BusNumber = *($(!STF_NCDETINFO),6)
  349.     endif
  350. adapterverify =+
  351.     Ifstr(i) $(DetectedCard) != TRUE
  352.         Goto skipoptions
  353.     Endif
  354.     Debug-Output "OEMNADN2.INF: Calling Param_VerifyCard"
  355.     Shell $(ParamInf) Param_VerifyCard $(!STF_NCDETCARD)
  356.     Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  357.         Debug-Output "OEMNADN2.INF: Param_VerifyCard succeeded"
  358.         Goto skipoptions
  359.     Endif
  360.     Set from = adapteroptions
  361.     Set to = skipoptions
  362.     Shell $(UtilityInf),RegistryErrorString,VERIFY_WARNING
  363.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  364.         Debug-Output "ShellCode error: cannot get an error string."
  365.         goto ShellCodeError
  366.     endif
  367.     set Error = $($R0)
  368.     Goto Warning
  369. skipoptions =+
  370.     ifint $(OldVersionExisted) == $(TRUE)
  371.         ifstr(i) $(!NTN_InstallMode) == configure
  372.                 goto writeparameters
  373.         endif
  374.     endif
  375.     StartWait
  376.     ifint $(OldVersionExisted) == $(FALSE)
  377.         ifstr(i) $(!NTN_InstallMode) == "install"
  378.                 Ifstr(i) $(DoCopy) == "YES"
  379.                     Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  380.                     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  381.                         Goto ShellCodeError
  382.                     Else-Ifstr(i) $($R0) == STATUS_FAILED
  383.                         Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  384.                         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  385.                            goto ShellCodeError
  386.                         endif
  387.                         set Error = $($R0)
  388.                         Goto fatal
  389.                     Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  390.                         Goto successful
  391.                     Endif
  392.                     Set SrcDir = $($R1)
  393.                 Endif
  394.                 install "Install-Option"
  395.                 ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  396.                     Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  397.                     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  398.                         goto ShellCodeError
  399.                     endif
  400.                     set Error = $($R0)
  401.                     goto fatal
  402.                 endif
  403.         endif
  404.        Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  405.                         $(ProductSoftwareName), +
  406.                         $(ProductSoftwareName), +
  407.                         $(ProductSoftware$(Option)Title), $(STF_CONTEXTINFNAME), +
  408.                         $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  409.                         $(NetEventDLL)
  410.        Set OEM_ABANDON_SOFTWARE = TRUE
  411.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  412.         Debug-Output "ShellCode error"
  413.         goto ShellCodeError
  414.        endif
  415.        set RegistryErrorIndex = $($R0)
  416.        set KeyProduct      = $($R1)
  417.        Set SoftNetRulesKey = $($R2)
  418.        CloseRegKey $($R3)
  419.        CloseRegKey $($R4)
  420.        CloseRegKey $($R5)
  421.        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  422.         EndWait
  423.         Debug-Output "Registry error: add software components"
  424.         CloseRegKey $(KeyProduct)
  425.         CloseRegKey $(SoftNetRulesKey)
  426.         goto fatalregistry
  427.        endif
  428.        set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  429.                    {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  430.                    {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  431.                    {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftware$(Option)Title)},+
  432.                    {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftware$(Option)Description)},+
  433.                    {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  434.                    {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  435.        Shell  $(UtilityInf), AddValueList, $(KeyProduct), $(NewValueList)
  436.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  437.         Debug-Output "ShellCode error."
  438.         goto ShellCodeError
  439.        endif
  440.        set RegistryErrorIndex = $($R0)
  441.        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  442.         EndWait
  443.         Debug-Output "Registry error: add value list."
  444.         CloseRegKey $(KeyProduct)
  445.         CloseRegKey $(SoftNetRulesKey)
  446.         goto fatalregistry
  447.        endif
  448.        set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  449.                         {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  450.                         {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  451.                         {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  452.                         {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  453.                         {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  454.        Shell  $(UtilityInf), AddValueList, $(SoftNetRulesKey), $(NewValueList)
  455.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  456.         Debug-Output "ShellCode error."
  457.         goto ShellCodeError
  458.        endif
  459.        set RegistryErrorIndex = $($R0)
  460.        CloseRegKey $(KeyProduct)
  461.        CloseRegKey $(SoftNetRulesKey)
  462.        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  463.         EndWait
  464.         Debug-Output "Resgitry error: add value list."
  465.         goto fatalregistry
  466.        endif
  467.     endif
  468.     Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  469.     ifint $($R4) != -1
  470.                 Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  471.     endif
  472.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  473.                 Debug-Output "Cannot add hardware component"
  474.                 goto ShellCodeError
  475.     endif
  476.     set RegistryErrorIndex = $($R0)
  477.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  478.                 EndWait
  479.                 Debug-Output "Registry error: add hardware component"
  480.                 CloseRegKey $($R1)
  481.                 CloseRegKey $($R2)
  482.                 CloseRegKey $($R3)
  483.                 goto fatalregistry
  484.     endif
  485.     set KeyParameters = $($R3)
  486.     set KeyAdapterRules = $($R2)
  487.     set AdapterNumber = $($R4)
  488.     set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  489.                        {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(Option)Title)},+
  490.                        {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
  491.                        {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  492.                        {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  493.                        {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)},+
  494.                        {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  495.     Shell  $(UtilityInf), AddValueList, $($R1), $(NewValueList)
  496.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  497.                 Debug-Output "ShellCode error"
  498.                 goto ShellCodeError
  499.     endif
  500.     CloseRegKey $($R1)
  501.     set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  502.     set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  503.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  504.                         {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  505.                         {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  506.                         {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  507.     Shell  $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  508.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  509.                 Debug-Output "ShellCode error."
  510.                 goto ShellCodeError
  511.     endif
  512.     set RegistryErrorIndex = $($R0)
  513.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  514.                 EndWait
  515.                 Debug-Output "Resgitry error: add value list."
  516.                 CloseRegKey $(KeyParameters)
  517.                 CloseRegKey $(KeyAdapterRules)
  518.                 goto fatalregistry
  519.     endif
  520.     CloseRegKey $(KeyAdapterRules)
  521.     goto writeparameters
  522. writeparameters = +
  523.     ifint $(BusInterfaceType) == 8
  524.         set PCMCIA = 1
  525.         set BusInterfaceType = 1
  526.     endif
  527.     set NewValueList = {{InterruptNumber,$(NoTitle),$(!REG_VT_DWORD),$(IRQValue)},+
  528.                        {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusInterfaceType)},+
  529.                        {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+
  530.                        {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  531.                        {CardType,$(NoTitle),$(!REG_VT_DWORD),1},+
  532.                        {PCCARDAttributeMemoryAddress,$(NoTitle),$(!REG_VT_DWORD),$(PcCardBaseValue)},+
  533.                        {PCCARDAttributeMemorySize,$(NoTitle),$(!REG_VT_DWORD),4096},+
  534.                        {IoBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(IOBaseAddrValue)}}
  535.     Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  536.     ifint $(PCMCIA) == 1
  537.         set NewValueList = {{Pcmcia,$(NoTitle),$(!REG_VT_DWORD),1}}
  538.         Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  539.     else
  540.         DeleteRegValue $(KeyParameters) "Pcmcia"
  541.     endif
  542.     ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"
  543.         Shell $(UtilityInf),AddDefaultNetCardParameters,$(KeyParameters)
  544.     endif
  545.     CloseRegKey $(KeyParameters)
  546.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  547.                 Debug-Output "ShellCode error."
  548.                 goto ShellCodeError
  549.     endif
  550.     set RegistryErrorIndex = $($R0)
  551.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  552.                 Debug-Output "Registry error: Add value list"
  553.                 goto fatalregistry
  554.     endif
  555.     EndWait
  556.     goto successful
  557. bindingadapter =+
  558.     set Error = "Binding: Sorry, not yet implemented."
  559.     goto fatal
  560. removeadapter = +
  561.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  562.                 Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  563.                                 $(ProductSoftwareName)
  564.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  565.                                 Debug-Output "ShellCode error"
  566.                                 goto ShellCodeError
  567.                 endif
  568.                 set RegistryErrorIndex = $($R0)
  569.                 Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  570.                                 goto fatalregistry
  571.                 endif
  572.     else
  573.                 Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  574.                         $(ProductSoftwareName), $(!NTN_RegBase)
  575.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  576.                                 Debug-Output "ShellCode error"
  577.                                 goto ShellCodeError
  578.                 endif
  579.                 set RegistryErrorIndex = $($R0)
  580.                 Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  581.                                 goto fatalregistry
  582.                 endif
  583.     endif
  584.     goto end
  585. UpgradeSoftware = +
  586.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  587.     Ifstr $(KeyProduct) != $(KeyNull)
  588.         install "Install-Update"
  589.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  590.             goto fatal
  591.         endif
  592.         SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  593.         SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  594.         CloseRegKey $(KeyProduct)
  595.     else
  596.         goto fatalregistry
  597.     endif
  598.     set iSearch = 1
  599. nextnetcard = +
  600.     Shell $(UtilityInf), FindNextNetworkCard, $(ProductHardwareName), $(iSearch)
  601.     set KeyNetcard = $($R0)
  602.     set iSearch = $($R1)
  603.     Debug-Output "OemNadEp.Inf: FindNextNetworkCard "$(KeyNetcard)","$(iSearch)
  604.     Ifstr $(KeyNetcard) != $(KeyNull)
  605.         Debug-Output "OemNadEp.Inf: Setting OperationsSupport value"
  606.         SetRegValue $(KeyNetcard) {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)}
  607.         CloseRegKey $(KeyNetcard)
  608.         goto nextnetcard
  609.     Endif
  610.     goto end
  611. successful = +
  612.     goto end
  613. abandon = +
  614.     ForListDo $(OEM_ABANDON_OPTIONS)
  615.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  616.             $(ProductSoftwareName), $($)
  617.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  618.             Debug-Output "ShellCode error"
  619.             goto ShellCodeError
  620.         endif
  621.         set RegistryErrorIndex = $($R0)
  622.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  623.             goto fatalregistry
  624.         endif
  625.     EndForListDo
  626.     Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  627.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  628.             $(ProductSoftwareName), FALSE
  629.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  630.             Debug-Output "ShellCode error"
  631.             goto ShellCodeError
  632.         endif
  633.         set RegistryErrorIndex = $($R0)
  634.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  635.             goto fatalregistry
  636.         endif
  637.     endif
  638.     goto end
  639. warning = +
  640.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  641.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  642.         goto ShellCodeError
  643.     endif
  644.     ifstr(i) $($R1) == "OK"
  645.         goto $(to)
  646.     else-ifstr(i) $($R1) == "CANCEL"
  647.         goto $(from)
  648.     else
  649.         goto "end"
  650.     endif
  651. nonfatalinfo = +
  652.     Set CommonStatus = STATUS_USERCANCEL
  653.     Set Severity = STATUS
  654.     goto nonfatalmsg
  655. nonfatal = +
  656.     Set Severity = NONFATAL
  657.     goto nonfatalmsg
  658. nonfatalmsg = +
  659.     ifstr(i) $(Error) == ""
  660.         Set Severity = NONFATAL
  661.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  662.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  663.             goto ShellCodeError
  664.         endif
  665.         set Error = $($R0)
  666.     endif
  667.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  668.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  669.         goto ShellCodeError
  670.     endif
  671.     ifstr(i) $($R1) == "OK"
  672.         goto $(from)
  673.     else
  674.         goto "end"
  675.     endif
  676. fatalregistry = +
  677.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  678.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  679.         goto ShellCodeError
  680.     endif
  681.     set Error = $($R0)
  682.     goto fatal
  683. fataldetect = +
  684.     Shell $(UtilityInf),RegistryErrorString,CANNOT_DETECT
  685.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  686.         Debug-Output "ShellCode error: cannot get an error string."
  687.         goto ShellCodeError
  688.     endif
  689.     set Error = $($R0)
  690.     Goto fatal
  691. fatal = +
  692.     ifstr(i) $(Error) == ""
  693.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  694.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  695.             goto ShellCodeError
  696.         endif
  697.         set Error = $($R0)
  698.     endif
  699.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  700.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  701.         goto ShellCodeError
  702.     endif
  703.     goto setfailed
  704. ShellCodeError = +
  705.     set DlgType      = "MessageBox"
  706.     set STF_MB_TITLE = $(ShellCodeErrorTitle)
  707.     set STF_MB_TEXT  = $(ShellCodeErrorText)
  708.     set STF_MB_TYPE  = 1
  709.     set STF_MB_ICON  = 3
  710.     set STF_MB_DEF   = 1
  711.     ui start "Error Message"
  712.     goto setfailed
  713. setfailed = +
  714.     set CommonStatus = STATUS_FAILED
  715.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  716.         set OEM_ABANDON_ON = FALSE
  717.         goto abandon
  718.     endif
  719.     goto end
  720. end = +
  721.     goto term
  722. term = +
  723.     Return $(CommonStatus)
  724. [Install-Option]
  725.     set STF_VITAL = ""
  726.     ifstr(i) $(AddCopy) == "YES"
  727.         AddSectionFilesToCopyList Files-NE2000IBMCOMPAT  $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  728.     endif
  729.     ifstr(i) $(DoCopy) == "YES"
  730.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  731.        CopyFilesInCopyList
  732.     endif
  733.     ifstr(i) $(DoConfig) == "YES"
  734.     endif
  735.     Exit
  736. [Install-Update]
  737.    set STF_VITAL        = ""
  738.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  739.    AddSectionFilesToCopyList Files-NE2000IBMCOMPAT $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  740.    exit
  741. [Source Media Descriptions]
  742.     1 = "Windows NT Workstation CD-ROM" , TAGFILE = cdrom_w.40
  743. [Signature]
  744.     FileType = MICROSOFT_FILE
  745. [GetSignature]
  746.     read-syms Signature
  747.     return $(FileType)
  748. [ProductType]
  749. STF_PRODUCT  = Winnt
  750. STF_PLATFORM = I386
  751. [Files-Inf]
  752. 2,    oemsetup.inf,     SIZE=1000,    RENAME=$(!UG_Filename)
  753. [Files-NE2000IBMCOMPAT]
  754. 1,NE2000.SYS , SIZE=999
  755. [LanguagesSupported]
  756.     ENG
  757. [OptionsTextENG]
  758.     NE2000IBMCOMPAT = "IBM Ethernet PCMCIA and Compatible Adapter"
  759.     NE4000PCMCIA    = "Novell NE4000 PCMCIA Adapter"
  760.     MICRODYNEPCMCIA = "Microdyne NE4000 PCMCIA Adapter"
  761. [FileConstantsENG]
  762. ProCaption   = "Windows NT Setup"
  763. ProCancel    = "Cancel"
  764. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  765.                "Are you sure you want to cancel copying files?"
  766. ProCancelCap = "Network Setup Message"
  767. ProText1     = "Copying:"
  768. ProText2     = "To:"
  769. ProductSoftwareNE2000IBMCOMPATDescription = "IBM Ethernet PCMCIA and Compatible Adapter Driver"
  770. ProductSoftwareNE2000IBMCOMPATTitle       = "IBM Ethernet PCMCIA and Compatible Adapter Driver"
  771. ProductSoftwareNE4000PCMCIADescription = "Novell NE4000 PCMCIA Adapter Driver"
  772. ProductSoftwareNE4000PCMCIATitle       = "Novell NE4000 PCMCIA Adapter Driver"
  773. ProductSoftwareMICRODYNEPCMCIADescription      = "Microdyne NE4000 PCMCIA Adapter Driver"
  774. ProductSoftwareMICRODYNEPCMCIATitle    = "Microdyne NE4000 PCMCIA Adapter Driver"
  775. ProductHardwareNE2000IBMCOMPATDescription  = "IBM Ethernet PCMCIA and Compatible Adapter"
  776. ProductHardwareNE2000IBMCOMPATTitle    = "IBM Ethernet PCMCIA and Compatible Adapter"
  777. ProductHardwareNE4000PCMCIADescription = "Novell NE4000 PCMCIA Adapter"
  778. ProductHardwareNE4000PCMCIATitle       = "Novell NE4000 PCMCIA Adapter"
  779. ProductHardwareMICRODYNEPCMCIADescription = "Microdyne NE4000 PCMCIA Adapter"
  780. ProductHardwareMICRODYNEPCMCIATitle       = "Microdyne NE4000 PCMCIA Adapter"
  781. FunctionTitle   = $(ProductHardware$(Option)Title)" Card Setup"
  782. ShellCodeErrorTitle     = "Error: "$(FunctionTitle)
  783. ShellCodeErrorText      = "Shell Code Error."
  784. [DialogConstantsENG]
  785. Help        = "&Help"
  786. Exit        = "Cancel"
  787. OK          = "OK"
  788. HelpContext = ""
  789. Continue    = "Continue"
  790. Cancel      = "Cancel"
  791. [FileDependentDlgENG]
  792. Combo1Label = "&IRQ Level:"
  793. Combo2Label = "&Memory Base Address:"
  794. Combo3Label = "I/&O Port Address:"
  795. DlgType = "MultiCombo"
  796. DlgTemplate = "WD"
  797. Caption = $(FunctionTitle)
  798. Combo1List = $(IRQList)
  799. Combo1Out  = $(IRQValue)
  800. Combo2List = $(PcCardAddressHexList)
  801. Combo2Out  = $(PcCardBaseAddress)
  802. Combo3List = $(IOBaseAddrHexList)
  803. Combo3Out  = $(IOBaseAddress)
  804. ComboListItemsIn  = {Combo1List, Combo2List, Combo3List}
  805. ComboListItemsOut = {Combo1Out, Combo2Out, Combo3Out}
  806. EditTextIn = ""
  807. EditTextLim = ""
  808. NotifyFields = {NO, NO, NO}
  809. HelpContext = $(!IDH_DB_OEMNADWD_INS)
  810.